﻿#include <iostream>
#include "yolo_object_detection.h"

using namespace std;
using namespace cv;

int main(int argc, char** argv) 
{
	std::string xml = "F:/YOLOV5/yolov5/yolov5s.xml";
	std::string bin = "D:/python/yolov5/yolov5s.bin";
	std::string onnx_yolov5s = "D:/python/yolov5/yolov5s.onnx";
	std::string image_file = "D:/python/yolov5/data/images/zidane.jpg";
	std::string apple_file = "D:/python/yolov5/fruit_training/test_images/11.png";
	std::string fruit_xml = "D:/best.xml";
	std::string fruit_bin = "D:/best.bin";
	std::string video_file = "D:/images/video/Boogie_Up.mp4";
	YOLOObjectDetection yolo_detector;
	yolo_detector.ReadNetwork(fruit_xml, fruit_bin);

	string pattern = "D:/new/*.jpg";

	vector<Mat> images;

	vector<String> fn;
	glob(pattern, fn, false);

	for (int i = 0; i < fn.size(); i++)
	{
		Mat Image = imread(fn[i]);
		yolo_detector.DetectNetWork(Image, 0.5);
	}
	return 0;
}